package com.zky.controller;

import com.zky.pojo.user;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class userController {
    @Value("${my.username}")
    private String myName;
    @Value("${my.age}")
    private String myage;
    @Value("${my.userpassword}")
    private String mypassword;
    @ResponseBody
    @GetMapping("/show")
    public user data01()
    {
        user user=new user();
        user.setId(1);
        user.setAge(1);
        user.setName("zky");
        System.out.println(myage);
        System.out.println(myName);
        System.out.println(mypassword);
        return user;
    }
}
